home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / shells / ksh_v04a.lzh / examples.lzh / pr_rep.ksh < prev   
Encoding:
Text File  |  1991-01-10  |  465 b   |  20 lines

  1. #    Just an example script from "A Practical Guide to The Unix System"
  2. #    by Mark G. Sobell
  3. #
  4. #    I was desperate for some ksh specific shell scripts to test with
  5. #    just type "pr_rep data" from within ksh - it shows what some of the
  6. #    typeset commands do if nothing else.
  7.  
  8. typeset -uL10 last
  9. typeset -uL8 first
  10. typeset -Z10 amount
  11. typeset -L4 space
  12. IFS="    "
  13. space=" "
  14.  
  15. cat $1 |
  16. while read last first amount
  17. do
  18.     print "$last $space $first $amount"
  19. done
  20.